/*--------------------------------------------------------------------------------*/
#ifndef __GRAPHIC_2D_RENDERER__
#define __GRAPHIC_2D_RENDERER__
/*--------------------------------------------------------------------------------*/
#include "primitives.h"
#include "object.h"
#include "util.h"
#include "math_vector_2.h"
#include "math_rectangle.h"
#include "color.h"
#include "graphic_2d_object.h"
#include "graphic_texture.h"
#include "timer.h"
#include "primitives.h"
/*--------------------------------------------------------------------------------*/
class GRAPHIC_2D_RENDERER : public OBJECT
{

public:

    DECLARE_REF( GRAPHIC_2D_RENDERER );
    DECLARE_SINGLETON( GRAPHIC_2D_RENDERER );

    // .. CONSTRUCTORS

    GRAPHIC_2D_RENDERER() :
    	OBJECT(),
    	ObjectTable()
    {

    }

    virtual ~GRAPHIC_2D_RENDERER()
    {
    }

    // .. METHODS

    VOID SetDrawColor( const COLOR & color );

    VOID DrawVector2( const MATH_VECTOR_2 & vector );
    VOID DrawRectangle( const MATH_RECTANGLE & rectangle );

    VOID AddObject( const GRAPHIC_2D_OBJECT::REF & object );
    VOID UpdateObjects( const TIMER & time_step );
    VOID RenderObjects();

    // -- PRIVATE

private :

    // .. ATTRIBUTES

    ARRAY< GRAPHIC_2D_OBJECT::REF >
		ObjectTable;
};
/*--------------------------------------------------------------------------------*/
#endif
